﻿module lang.d.sts.statements.ddeclarationstatement;

import lang.d.sts.statements.dstatement;
import lang.d.sts.declarations.ddeclaration;
import lang.d.visitors.dvisitor;

class DDeclarationStatement: DStatement {
    private DDeclaration myDeclaration;

    public this(DDeclaration decl) 
    in {
        assert(decl !is null);
    }
    body {
        myDeclaration = decl;
        decl.setParent(this);
    }

    public DDeclaration getDeclaration() {
        return myDeclaration;
    }

    override public void accept(DVisitor visitor) {
        visitor.visitDeclarationStatement(this);
    }
}
